<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
   <title>点步微助手--佣金提现</title>
   <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
   <meta name="renderer" content="webkit"/>
   <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0"/>
   <meta name="viewport" content="target-densitydpi=device-dpi, width=375px, user-scalable=no"/>
   #include ("/_includes/header.html")
   <link rel="stylesheet" href="#(webctx)/resources/css/weui.min.css"/>
   <style>
   .weui-tab {
    	position: relative;
    	height: 100%;
	}
	.weui-navbar {
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    position: absolute;
    z-index: 500;
    top: 0;
    width: 100%;
    background-color: #fafafa;
	}
	.weui-navbar:after {
    content: " ";
    position: absolute;
    left: 0;
    bottom: 0;
    right: 0;
    height: 1px;
    border-bottom: 1px solid #ccc;
    color: #ccc;
    -webkit-transform-origin: 0 100%;
    transform-origin: 0 100%;
    -webkit-transform: scaleY(.5);
    transform: scaleY(.5);
	}
	.weui-navbar__item {
	color: #888;
    position: relative;
    display: block;
    -webkit-box-flex: 1;
    -webkit-flex: 1;
    flex: 1;
    padding: 13px 0;
    text-align: center;
    font-size: 15px;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
	}
	.weui-navbar__item.proinfo-tab-tit {
    padding: 10px 0;
	}
	.weui-navbar__item.weui-bar__item--on {
    color: #e21323;
    font-weight: bold;
    background-color: inherit;
	}
	.weui-navbar__item.proinfo-tab-tit.weui-bar__item--on:before {
    content: "";
    width: 34px;
    height: 3px;
    background: #e21323;
    position: absolute;
    left: 50%;
    margin-left: -17px;
    bottom: -1px;
    z-index: 10;
	}
	.weui-tab__bd {
    	padding: 50px 10px 0px;
	}
	.input-group{
		margin-top: 10px;
	}
	.input-group-btn{
		position: absolute;
		top: 0px;
		right: 0px;
	}
 	#code-error{ 
		display: block;
	}
   </style>
</head>
<body>
<div class="weui-tab">
	<div class="weui-navbar " style="position:fixed;  left:0; right:0; height:44px; background:#fff;">
    	<a href="#(webctx)/invitecode/app" class="weui-navbar__item proinfo-tab-tit font-14">邀请码生成</a>
        <a href="#(webctx)/invitecode/app/stat" class="weui-navbar__item proinfo-tab-tit font-14">我邀请的人</a>
        <a href="#(webctx)/invitecode/app/mission" class="weui-navbar__item proinfo-tab-tit font-14 weui-bar__item--on">我的佣金</a>
        <a href="#(webctx)/invitecode/app/cashrcd" class="weui-navbar__item proinfo-tab-tit font-14">提现明细</a>
	</div>
	
	<div class="weui-tab__bd" >
		<div class="alert alert-success">
			<i class="fa fa-info-circle"></i><strong>提示:</strong>
			<p>通过邀请码邀请用户注册并购买平台小程序模板后，可以获得一定的佣金</p>
			<p>每天只能提现一次，提现审核3个工作日左右到账，如果没到账，请联系客服</p>
		</div>
		<div class="contain-fluid" > 
			<form id="_myForm_" class="form-horizontal">
		        <div class="form-group">
		            <label class="col-md-3 control-label">手机号：</label>
		            <div class="col-md-3">
	                	<input type="text" id="phone" class="form-control" value="#shiroPrincipal() #(principal.phone) #end" readonly="readonly"/>
		            </div>
		        </div>
		        <div class="form-group">
		            <label class="col-md-3 control-label">短信验证码：</label>
		            <div class="col-md-3">
		            	<div class="input-group">
	                        <input type="text" name="code" class="form-control" value=""/>
	                        <span class="input-group-btn"><a id="sendCodeBtn" href="javascript:void(0)" class="btn btn-primary">发送验证码</a></span>
	                    </div>
		            </div>
		        </div>
		        <div class="form-group">
		            <label class="col-md-3 control-label">交易密码：</label>
		            <div class="col-md-3">
	                        <input type="password" name="password" class="form-control" value=""/>
		            </div>
		        </div>
		        <div class="form-group">
		            <label class="col-md-3 control-label">确认交易密码：</label>
		            <div class="col-md-3">
	                        <input type="password" name="confirmPwd" class="form-control" value=""/>
		            </div>
		        </div>
		        
		         <div class="form-group">
		            <div class="col-md-6" align="right">
		               <button type="submit" class="btn btn-success btn-sm">保存</button>
		               <a href="#(webctx)/incodetradepwd/app" class="btn btn-default btn-sm">取   消</a>
		            </div>
		        </div>
		       
			</form>
		</div>	
	</div>
</div>
</body>
</html>
<script type="text/javascript">
$(document).ready(function(){
	$("#sendCodeBtn").click(function(){
		if($("#phone").val() == null || $("#phone").val() == ""){
			obz.warn("请输入手机号码");
			return;
		}
		$(".form-horizontal").mask("正在发送验证码...");
		obz.ajaxJson(obz.ctx+"/sendPwdCode", {phone:$("#phone").val()}, function(resp){
			$(".form-horizontal").unmask();
			if(resp.code == 200){
				obz.msg("短信验证码已发送，请留意手机短信");//alert(resp.msg);
			}
		});
	});
	//validate signup form on keyup and submit
	var icon = "<i class='fa fa-times-circle'></i> ";
	$("#_myForm_").validate({
		//debug:true,
		errorElement: "em",
	    success: function(em) {
	        em.text("").addClass("success");//验证通过的动态CSS
	    },
	    submitHandler: function() {
	    	obz.showMessage("确认保存吗?", function(){
	    		$("#_myForm_").mask("正在保存...");
		    	var params = $("#_myForm_").wxmall_serialize();
		    	obz.ajaxJson(obz.ctx+"/user/saveTradepwd", params, function(json) {
		    		$("#_myForm_").unmask();
					if(json.code!=200){
						obz.error(json.msg);
					}else{
						obz.msg('保存成功', function(){
							location.href="#(webctx)/user";
						});					
					}
				},"json");
	    	});
	    },
	    rules: {
	    	code: "required", password: "required", confirmPwd: "required"
	    },
	    messages: {
	    	code: icon + "请输入短信验证码", password: icon + "请输入交易密码", confirmPwd: icon + "请输入确认交易密码"
	    }
	});
});
</script>